// pages/log/log.js
Page({

  data: {

  },

  onLoad: function (options) {

  },

  getUserInfo(ev){ 
    const userInfo = ev.detail.userInfo  //倘若用户点击的是拒绝，返回undefined
    if(userInfo != undefined){
      getApp().globalData.userInfo = userInfo
      wx.showToast({
        title: '已授权成功',
      })
      setTimeout(() => {
        wx.navigateBack({})
      },1500)
    }
  }
})